package com.tnsw.facebookautoliker;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;

public class FragmentAlertDialog extends DialogFragment {
	
	private Context context;
	private Fragment parentFragment;
	
	private String title;
	private String message;
	
	private AlertDialog.Builder dialog;
	
	public FragmentAlertDialog() {
		
	}
	
	public void setContext(Context context) {
		this.context = context;
	}
	
	public void setParentFragmenrt(Fragment parent) {
		this.parentFragment = parent;
	}
	
	@Override
	public void setArguments(Bundle args) {
		super.setArguments(args);
	}
		
	public void setTitle(String title) {
		this.title = title;
	}
	
	public String getTitle() {
		return(this.title);
	}
	
	public void setMessage(String message) {
		
		this.message = message;
	}
	
	public String getMessage() {
		return(this.message);
	}
		
	@Override
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		this.dialog = new AlertDialog.Builder(this.context);
		
		dialog.setTitle(this.title);
		dialog.setMessage(this.message);
		dialog.setPositiveButton("OK", null);
		
		
		return(dialog.create());
	}
	
	

}
